From: Keir Fraser Date: Wed, 2 Jul 2008 16:28:27 +0000 (+0100) Subject: iommu: Fix hvm_dpci_eoi for smp guest in ioapic interrupt mode X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14188^2~126 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=fec35adc8693a574a5fa77f06c56916a6e185043;p=xen.git iommu: Fix hvm_dpci_eoi for smp guest in ioapic interrupt mode My testing shows, for some smp guests, ent->fields.mask will not be unmasked when hvm_dpci_eoi() is invoked at the first time. In that case, we should rely on timeout call back to do pirq_guest_eoi() and should not stop the per-irq timer too early. From: Wei Wang Signed-off-by: Keir Fraser --- diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index 7e38237907..422ae18a0e 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -258,10 +258,12 @@ void hvm_dpci_eoi(struct domain *d, unsigned int guest_gsi, { spin_unlock(&hvm_irq_dpci->dirq_lock); - stop_timer(&hvm_irq_dpci->hvm_timer[ - domain_irq_to_vector(d, machine_gsi)]); if ( (ent == NULL) || !ent->fields.mask ) + { + stop_timer(&hvm_irq_dpci->hvm_timer[ + domain_irq_to_vector(d, machine_gsi)]); pirq_guest_eoi(d, machine_gsi); + } } else spin_unlock(&hvm_irq_dpci->dirq_lock);